


public class Interval {
	private TimeStamp clockIn;
	private TimeStamp clockOut;
	
	public Interval(TimeStamp clockIn, TimeStamp clockOut) {
		this.clockIn = clockIn;
		this.clockOut = clockOut;
	}
	public TimeStamp getClockIn() {
		return clockIn;
	}
	public void setClockIn(TimeStamp clockIn) {
		this.clockIn = clockIn;
	}
	public TimeStamp getClockOut() {
		return clockOut;
	}
	public void setClockOut(TimeStamp clockOut) {
		this.clockOut = clockOut;
	}
	public int getDuration() {
		int day = clockOut.getDay() - clockIn.getDay();
		int minutes = clockOut.getMinute() - clockIn.getMinute();
		
		int result = day*24*3600 + minutes;
		return result;
	}
}
